package moxl.parser.assemblers.openelement;

public enum OpenElementAssemblerState
{
	OpenElementStartState(new OpenElementStartState()),
	OpenElementExpectingAttributeNameOrCloseState(new OpenElementExpectingAttributeNameOrCloseState()),
	OpenElementExpectingAttributeValueDoubleQuoteState(new OpenElementExpectingAttributeValueDoubleQuoteState()),
	OpenElementExpectingAttributeValueSingleQuoteState(new OpenElementExpectingAttributeValueSingleQuoteState()),
	OpenElementExpectingCloseDoubleQuoteState(new OpenElementExpectingCloseDoubleQuoteState()),
	OpenElementExpectingCloseSingleQuoteState(new OpenElementExpectingCloseSingleQuoteState()),
	OpenElementExpectingEqualsState(new OpenElementExpectingEqualsState()),
	OpenElementExpectingNameState(new OpenElementExpectingNameState()),
	OpenElementExpectingOpenQuoteState(new OpenElementExpectingOpenQuoteState()),
	OpenElementInElementState(new OpenElementInElementState()),
	OpenElementEndState(null);

	public static final OpenElementAssemblerState START = OpenElementStartState;
	public static final OpenElementAssemblerState END = OpenElementEndState;

	private final OpenElementStateDelegateBase delegate;

	OpenElementAssemblerState(OpenElementStateDelegateBase delegate)
	{
		this.delegate = delegate;
		if (delegate != null)
		{
			delegate.associateState(this);
		}
	}

	public OpenElementStateDelegateBase getDelegate()
	{
		return delegate;
	}
}
